"""
获取百度首页HTML代码
str   ---> 字符串 ---> encode() ---> bytes
bytes ---> 字节串 ---> decode() ---> str
"""
import requests

resp = requests.get('https://www.baidu.com/')
print(type(resp), resp.status_code)
print(resp.content.decode('utf-8'))
